package de.hska.pwmanager.controller;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;

import de.hska.pwmanager.controller.errors.ValidationException;

public abstract class AbstractController {
	@ExceptionHandler(ValidationException.class)
	@ResponseStatus(value = HttpStatus.METHOD_FAILURE)
	public final @ResponseBody
	Exception handleException(Exception ex) {
		return ex;
	}
}
